<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <link href="../static/mui/css/mui.min.css" rel="stylesheet"/>
	<style>
		.mui-content>ul:nth-child(1){
			list-style: none;
			padding-top: 6%;
			padding-bottom: 3%;
			padding: 0px;
		}
		.name{
			margin-top: 2%; 
			font-size: large;
			margin-bottom: 2%;
		}
		.versionLabel{
			border-radius: 12px; 
			width: 35%;
		}
		.itemli{
			height: 50px;
		}
		.itema{
			height: 50px;
		}
		.itema span{
			line-height: 28px;
			font-size: 15px;;
		}
		.mui-table-view-cell.mui-active{
			    background-color: #FFFFFF;
		}
		.mui-table-view-cell{padding:12px 15px}
		.mui-table-view-cell>a:not(.mui-btn){margin:-13px -15px;}
		.mui-btn-block {
		    padding: 9px 0;
		}
	</style>
</head>
	<body>
		<header class="mui-bar mui-bar-nav" style="background-color:#dd524d ;">
		    <h1 class="mui-title" style=" color: #fff;">更多</h1>
		</header>
		<div class="mui-content" >
			<ul style="" class="mui-text-center">
				<li class="logimg" style=""><img style="width:34%;" src="../static/app/img/logo.png"/></li>
				<li style="" class="name"><span>大实惠商家</span></li>
				<li><span class="mui-btn mui-btn-danger mui-btn-outlined versionLabel" id="versionLabel"></span></li>
			</ul>
			<ul class="mui-table-view mui-table-view-chevron">
				<li class="mui-table-view-cell mui-media itemli editPwd">
					<a class="mui-navigate-right itema">
						<img style="height: 25px;" class="mui-media-object mui-pull-left" src="../static/app/img/menu_bot04_password.png">
						<span >密码修改</span>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media itemli feedback">
					<a class="mui-navigate-right itema">
						<img style="height: 25px;" class="mui-media-object mui-pull-left mui-icon-person" src="../static/app/img/menu_bot04_feedback.png">
						<span >意见反馈</span>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media itemli checkVersion" >
					<a class="mui-navigate-right itema">
						<img style="height: 25px;" class="mui-media-object mui-pull-left mui-icon-person" src="../static/app/img/menu_bot04_upgrade.png">
						<span id="checkVersionBtn">检测升级</span>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media itemli serPhone" >
					<a class="mui-navigate-right itema">
						<img style="height: 25px;" class="mui-media-object mui-pull-left mui-icon-person" src="../static/app/img/menu_bot04_phone.png">
						<span >服务电话</span>
						<span class="mui-pull-right" style="color:#AEAEAE; " id="dashihuiTel" data-val="400-555-256">400-555-256</span>
					</a>
				</li>
			</ul>
			<div class="mui-content-padded" style="margin-top:5%;" >
		    	<button id="exitBtn" class="mui-pull-center mui-btn mui-btn-primary mui-btn-block" type="button" >退出登录</button>
		    </div>
		</div>
		<script type="text/javascript" src="../static/lib/jquery-1.11.2.min.js"></script>
		<script type="text/javascript" src="../static/mui/js/mui.min.js"></script>
		<script type="text/javascript" src="../static/app/js/prop.js"></script>
		<script type="text/javascript" src="../static/app/js/kit.js"></script>
		<script type="text/javascript" src="../static/app/js/api.js"></script>
		<script type="text/javascript">
			mui.plusReady(function(){
				if(mui.os.ios){
					$("#exitBtn").hide(); 
				}
				//初始化显示当前版本号
				$("#versionLabel").text("版本" + Prop.appVersionName);
				//绑定退出事件
				$("#exitBtn").on("tap",function(){
					Kit.ui.confirm("提醒","退出当前用户",function(){
						Kit.ui.showLoading();
						var info = plus.push.getClientInfo();
						var shopid = Kit.dao.get("SHOP",true).ID;
						API.clearDevice(shopid, info.clientid, plus.device.uuid,function(data){
							Kit.dao.clear();
							plus.runtime.restart();
							Kit.ui.closeLoading();
						});
						//Kit.render.redirect('login.html');
						//应用重新启动
						//plus.runtime.restart();
						//跳转到登录界面        
						 /* mui.openWindow({
						  	 url:'login.html'
						  });*/
					});
				});
				
				/**
				 * 修改密码
				 */
				$(".editPwd").on("tap",function(){
					mui.openWindow({
						url:"common/resetPwd.html"
					});
				});
				
				/**
				 * 意见反馈
				 */
				$(".feedback").on("tap",function(){
					//Kit.ui.alert("暂时未提供修改密码服务");
					var shopid = Kit.dao.get("SHOP",true).ID;
					Kit.ui.prompt("意见反馈","请输入你反馈的内容","请输入",function(context){
						if(!shopid){
							Kit.ui.alert("商家id不能为空");
							return;
						}
						if(!context){
							Kit.ui.alert("反馈内容不能为空");
							return;
						}
						API.feedback(shopid, context,function(){
							setTimeout(function(){
								Kit.ui.alert("非常感谢您的反馈");
							},1000);
							
						}); 
					},null);
				}); 
				
				/**
				 * 检测升级
				 */
				$(".checkVersion").on("tap",function(){
					setTimeout(function(){
						API.checkVersion(false);
					},1000);
					
				});
				
				/**
				 * 服务电话
				 */
				$(".serPhone").on("tap",function(){
					plus.device.dial($("#dashihuiTel").attr("data-val"),true );
				});
			});
		</script>
	</body>
</html>
